home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16489 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.iadfw.net!usenet
  2. From: Mark Nelson <markn@airmail.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help w/ C++ DLLs and VBasic
  5. Date: Wed, 10 Apr 1996 20:23:37 -0500
  6. Organization: Guest user
  7. Message-ID: <316C5F19.4ABE@airmail.net>
  8. References: <4k1kv1$181o@hearst.cac.psu.edu>
  9. NNTP-Posting-Host: dal07-17.ppp.iadfw.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0GoldB2 (Win95; I)
  14.  
  15. rdg@falcon.arl.psu.edu wrote:
  16. > Does anyone have any advice on what I may be omitting in the DLL that is
  17. > causing the function not to appear in the DLL interface (at least as far
  18. > as VB is concerned).  I have also looked at the DLL with the DOS
  19. > "dumpbin/exports" utility and it shows that the functions have been
  20. > listed as exported from the DLL.
  21.  
  22. Microsoft made this difficult, but they do offer some help.  Your VB40
  23. root directory has a text document describing the hoops you need to jump
  24. through in order to talk to C++ DLLs from VB.  
  25.  
  26. My personal solution unfortunately had to fall back on using a DEF file
  27. instead of the inline declspec() notation.  If you use the declspec()
  28. and don't supply a def file, then you are going to have to supply a
  29. mangled alias name for your function in your BAS declaration.  That's
  30. because VC++ 4.0 decided to start mangling the names of exported functions
  31. declared with the _stdcall convention.
  32.  
  33. Mark Nelson
  34. http://web2.airmail.net/markn
  35.